home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
i
/
imagefxv2.1a.lha
/
ImageFX
/
Rexx
/
Flying.ifx
< prev
next >
Wrap
Text File
|
1996-03-02
|
3KB
|
175 lines
/*
* $VER: Flying 2.0.0 (24.9.92)
*
* Arexx program for the ImageFX image processing system.
* Written by Thomas Krehbiel
*
* Revised for ImageFX release 2.0.
*
* Fly half-size versions of the current buffer over the screen
* with different image processing effects done to them.
*
*/
OPTIONS RESULTS
SIGNAL ON BREAK_C
inpath = GETCLIP('Flying_InPath')
infile = GETCLIP('Flying_InFile')
outpath = GETCLIP('Flying_OutPath')
outfile = GETCLIP('Flying_OutFile')
IF inpath = "" THEN DO
GetPrefs LoadPath
inpath = result
END
IF outpath = "" THEN DO
GetPrefs RendPath
outpath = result
outfile = 'flying.anim'
END
RequestFile '"Select Image To Fly:"' inpath infile
IF rc ~= 0 THEN EXIT
inname = result
infile = filereq.file
inpath = filereq.path
RequestFile '"Select Output Animation File:"' outpath outfile
IF rc ~= 0 THEN EXIT
outname = result
outfile = filereq.file
outpath = filereq.path
SETCLIP('Flying_InPath', inpath)
SETCLIP('Flying_InFile', infile)
SETCLIP('Flying_OutPath', outpath)
SETCLIP('Flying_OutFile', outfile)
IF EXISTS(outname) THEN DO
RequestResponse 'Overwrite existing animation' outname'?'
IF rc ~= 0 THEN EXIT
ADDRESS COMMAND 'Delete' outname
END
LoadBuffer inname FORCE
IF rc ~= 0 THEN EXIT
Redraw Off
GetMain ; IF result = 0 THEN EXIT
PARSE VAR result name width height .
Undo Off
frame = 1
LockRange 0 OFF
SetRender Amiga
IF rc ~= 0 THEN EXIT
Render Mode Hires Lace Lace
Render Colors 16
Render Dither 4 0 0
Render Go
SaveRenderedAs ANIM outname Keep
LockRange 0 ON
CALL Clipit("FalseColor Standard")
CALL Fly
CALL Clipit("Color2Grey Luma ; ReliefMap 255 0")
CALL Fly
CALL Clipit("Color2Grey Luma ; EdgeDetect 30")
CALL Fly
CALL Clipit("Disperse 1")
CALL Fly
CALL Clipit("Halftone 2")
CALL Fly
CALL Clipit("Contrast 50")
CALL Fly
CALL Clipit("HorizMirror; VertMirror")
CALL Fly
Render Close
Render Go
SaveRenderedAs ANIM outname Append Keep
BREAK_C:
errcode = rc
SaveRenderedAs ANIM outname Close
Render Close
KillBrush
KillBuffer Force
IF errcode = 0 THEN
ADDRESS COMMAND 'VT' outname
EXIT
Clipit:
PROCEDURE EXPOSE width height
PARSE ARG effect
Scissors
Box 0 0 width height
Scale 42 42 Percent
INTERPRET effect
RETURN 0
Fly:
PROCEDURE EXPOSE width height frame y outname
GetBrush
PARSE VAR result name bwid bht .
y = RANDOM(bht%2,height-(bht%2))
framecount = 18
DO i = 1 TO framecount
Render Close
x = (i * (width+bwid) % framecount) - bwid%2
Message 'Frame '||frame||' ('||x||')'
frame = frame + 1
Buffer2Swap
DrawMode Darken
EdgeMode FeatherIn 5
Point x+10 y+10
DrawMode Normal
EdgeMode Normal
Point x y
Render Go
SaveRenderedAs ANIM outname Append Keep
Swap
END
KillBrush
RETURN 0